package com.api.shopapi.service;

import com.api.shopapi.entity.Mediciner;
import com.api.shopapi.entity.MedicinerStaffRel;
import com.api.shopapi.entity.User;
import com.api.shopapi.entity.dto.MedicinerDTO;
import com.github.pagehelper.PageInfo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public interface MedicinerService {

    List<MedicinerDTO> getList(String institutionCode);

    int insert(Mediciner mediciner);

    int updateByMedicinerCode(User user,Mediciner mediciner);

    int deleteByMedicinerCode(String medicinerCode);

    Mediciner getByMedicinerCode(String medicinerCode);

    int regInsert(User user, Mediciner mediciner);

    Mediciner getByUserCode(String userCode);

    Mediciner getByIdCard(String idCard);

    PageInfo<MedicinerDTO> getPageList(int pageIndex, int pageSize, String institutionCode, String name, int status);


    PageInfo<MedicinerDTO> pageByGovCode(int pageIndex, int pageSize, String governmentCode);



    PageInfo<Mediciner> pageByGovCodeInsCode(int pageIndex, int pageSize, String governmentCode,
                                             String institutionCode);


    List<MedicinerDTO> listByGovCode(String governmentCode);

    List<Mediciner> listByInsCode(String institutionCode);

    String getStaffCode(String userCode);


    void updateIdCardAndInstitution(Mediciner mediciner);
}
